<extend name="Public:common" />
<!--/sidebar-->
<block name="content">
	    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"> <i class="icon-font"></i>
                <a href="index.html">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">Flash管理</span>
            </div>
        </div>
        <div class="result-wrap">
                <div class="result-title">
                    <div class="result-list">
                        <a href="__URL__/finsert"><i class="icon-font"></i>新增</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%" style="font-size: 12px">
                        <tr style="font-weight: bold;">
                            <td>ID</td>
                            <td>排序</td>
                            <td>名称</td>
                            <td>图片</td>
                            <td>连接</td>
                            <td>创建时间</td>
                            <td>状态</td>
                            <td>操作</td>
                            <volist name="Farr" id="vo">
                                <tr>
                                    <td><{$vo.fid}></td>
                                 <td>
									<input class="common-input sort-input sort" name="sort" onblur="doblur(this,<{$vo['fid']}>)" value="<{$vo.sort}>" type="text">
								</td>
								<td><{$vo.title}></td>
                                    <td>
                                        <if condition="($vo.psrc eq '') ">
                                            <img
                                                src="__PUBLIC__/暂无图片.png" width="65px"
                                                height="80px" />
                                            <elseif condition="($vo.psrc neq '') " />
                                            <img id='img' src="/<{$vo.psrc}>
                                            " width="450px" height="150px" />
                                        </if>
                                    </div>

                                </td>
                                <td><{$vo.url}></td>
                                <td><?php echo getTime($vo['create_time'])?></td>
                          <if condition="($vo.status eq 1)"> <td><a href="javascript:sta(<{$vo.fid}>,0)" title="">开启</a></td>
                              <else /> <td><a href="javascript:sta(<{$vo.fid}>,1)" title="">关闭</a></td>
                        </if>
                                <td><a href="javascript:del(<{$vo.fid}>)">删除</a>
                                <a href="__URL__/fupdate/sid/<{$vo.fid}>">编辑</a></td>
                                <div></div>
                            </tr>
                        </volist>
                    </table>
                </div>
                <script>
function del(id){
            //删除 商品 漂亮的提示信息
            $.MsgBox.Confirm("删除提示", "执行后将无法恢复，确定继续吗？温馨提示", function() { 
                //发送 当前商品的id 和当前用户帐号
                $.post("__URL__/delete",{'sid':id},function(data){
                     $.MsgBox.Alert("消息", data);
                    location.reload();
                });
            })
        }
function doblur(s,id){
    var yh = $.trim($(s).val()); 
         $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
        $.post('__URL__/fedit', {type:id,val:yh}, function(data) {
            $.MsgBox.Alert("消息", data);
            location.reload();
            });
            })
        }


function sta(sid,sta){
     $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
            $.post('__URL__/status', {sid:sid,sta:sta}, function(data) {
                // alert(data);
                $.MsgBox.Alert("消息", data);
                location.reload();
                });
                })
        }
</script>
</block>
<!-- 		                            <form action="__URL__/fupload" enctype="multipart/form-data" method="post" >
			                            <input type="file" name="photo" />
			                            <input type="hidden" name="n" value="<{$vo.id}>">
			                            <input type="submit" value="提交" >
		                            </form> -->